home *** CD-ROM | disk | FTP | other *** search
- /*
- ** Apple Macintosh Developer Technical Support
- **
- ** File: TreeObj2.c
- ** Written by: Eric Soldan
- **
- ** Copyright © 1992 Apple Computer, Inc.
- ** All rights reserved.
- */
-
-
-
- #include "App.h" /* Get the application includes/typedefs, etc. */
- #include "App.Common.h" /* Get the stuff in common with rez. */
- #include "App.protos.h" /* Get the prototypes for the application. */
-
- #ifndef __TREEOBJ2__
- #include "TreeObj2.h"
- #endif
-
- extern TreeObjProcPtr gTreeObjMethods[];
-
-
-
- /**********************************************************************/
-
-
-
- #pragma segment File
- TreeObjHndl DoTreeHitTest(TreeObjHndl hndl, ClickInfo *click)
- {
- short cnum;
- TreeObjHndl hit;
-
- if (hit = (TreeObjHndl)DoTreeObjMethod(hndl, HITTESTMESSAGE, (long)click)) return(hit);
-
- for (cnum = 0; cnum < (*hndl)->numChildren; ++cnum)
- if (hit = DoTreeHitTest(GetChildHndl(hndl, cnum), click)) return(hit);
-
- return(nil);
- }
-
-
-
- /**********************************************************************/
-
-
-
- #pragma segment File
- void DoTreeDraw(TreeObjHndl hndl, short drawType)
- {
- DoBTreeMethod(hndl, DRAWMESSAGE, drawType);
- }
-
-
-
- /**********************************************************************/
-
-
-
- #pragma segment File
- void DoTreeSelect(TreeObjHndl hndl, short selectType)
- {
- FileRecHndl frHndl;
- WindowPtr window;
-
- frHndl = mDerefRoot(GetRootHndl(hndl))->frHndl;
- BeginContent(window = (*frHndl)->fileState.window);
- DoFTreeMethod(hndl, SETSELECTMESSAGE, selectType);
- EndContent(window);
- }
-
-
-
- /**********************************************************************/
-
-
-
- #pragma segment File
- long DoTreeObjMethodClipped(TreeObjHndl hndl, short message, long data)
- {
- FileRecHndl frHndl;
- WindowPtr window;
- long val;
-
- frHndl = mDerefRoot(GetRootHndl(hndl))->frHndl;
- BeginContent(window = (*frHndl)->fileState.window);
-
- val = DoTreeObjMethod(hndl, message, data);
-
- EndContent(window);
-
- return(val);
- }
-
-
-
-